

import combineaction from "./combineaction";
import copyaction from "./copyaction";
import pasteaction from "./pasteaction";
import closepolylineaction from "./closepolylineaction";
import finishplotactoin from "./finishplotactoin";
import pickaction from "./pickaction";
import deleteaction from "./deleteaction";
import animateaction from "./animateaction";
import lockaction from "./lockaction";
import compositepathaction from "./compositepathaction";
import makesymbolaction from "./makesymbolaction";
import editpropaction from "./editpropaction";
import makeAsTitleAction from "./makeAsTitleAction";
import symbolUnitHighSettingAction from "./symbolUnitHighSettingAction";
import switchstateaction from "./switchstateaction";
import { ExplodeAction } from "./explodeaction";
import { XMindMenuAction } from "./xmind/xmindMenuAction";


var RightMenuActionFactory = {

}



RightMenuActionFactory.create = function (mapctrl, subItem) {
    var itemAction = null;
    switch (subItem) {
        case "combine":
            itemAction = new combineaction.CombineAction(mapctrl);
            break;

        case "copy":
            itemAction = new copyaction.CopyAction(mapctrl);
            break;

        case "paste":
            itemAction = new pasteaction.PasteAction(mapctrl);
            break;

        case "finish":
            itemAction = new finishplotactoin.FinishPlotAction(mapctrl);
            break;

        case "close":
            itemAction = new closepolylineaction.ClosePolylineAction(mapctrl);
            break;

        case "pick":
            itemAction = new pickaction.PickAction(mapctrl);
            break;

        case "delete":
            itemAction = new deleteaction.DeleteAction(mapctrl);
            break;

        case "lock":
        case "unlock":
            itemAction = new lockaction.LockAction(mapctrl, subItem);
            break;

        case "makeSymbol":
        case "generateIcon2Local":
            itemAction = new makesymbolaction.MakeSymbolAction(mapctrl, subItem);
            break;

        case "editprop":
            itemAction = new editpropaction.EditPropAction(mapctrl);
            break;

        case "xlink":
            break;

        case "makeAsTitle":
        case "makeAsTitleZone":
        case "makeAsEdge":
        case "makeAsLeadwire":
            itemAction = new makeAsTitleAction.MakeAsTitleAction(mapctrl, subItem);
            break;

        case "symbolUnitHighSetting":
            itemAction = new symbolUnitHighSettingAction.SymbolUnitHighSettingAction(mapctrl, subItem);
            break;

        case "switchState":
            itemAction = new switchstateaction.SwitchStateAction(mapctrl, subItem);
            break;

        case "explode":
            itemAction = new ExplodeAction(mapctrl, subItem);
            break;

        case 'insertTheme':
        case 'insertSubTheme':
            itemAction = new XMindMenuAction(mapctrl, subItem);
            break;

        default:
            break


    }
    return itemAction;
}

export default { RightMenuActionFactory }